package cn.itrigger.config;

import org.apache.maven.project.MavenProject;

public class VersionConfig {
    //nexus私服地址
    private String nexusUrl;
    //版本级别
    private VersionLevelEnum versionLevel;
    //git地址
    private String gitUrl;

    private String dailySubffix;

    private String uatSubffix;

    private String prodSubffix;
    //daily环境的分支
    private String dailyBranch;
    //uat环境的分支
    private String uatBranch;
    //prod环境分支
    private String prodBranch;
    //nexus上拉去依赖jar包的仓库
    private String env;
    //打标签
    private String tag;

    private String userName;

    private String userEmail;

    private String name;

    private String password;

    private String fixVersionNumber;

    private String updateVersion;

    private String module;

    private String deploy;

    private String hasInstall;

    private String uatIsRelease;

    private String updateDailyVersion;

    public String getHasInstall() {
        return hasInstall;
    }

    public void setHasInstall(String hasInstall) {
        this.hasInstall = hasInstall;
    }

    public String getDeploy() {
        return deploy;
    }

    public void setDeploy(String deploy) {
        this.deploy = deploy;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getUpdateVersion() {
        return updateVersion;
    }

    public void setUpdateVersion(String updateVersion) {
        this.updateVersion = updateVersion;
    }

    public String getFixVersionNumber() {
        return fixVersionNumber;
    }

    public void setFixVersionNumber(String fixVersionNumber) {
        this.fixVersionNumber = fixVersionNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getDailySubffix() {
        return dailySubffix;
    }

    public void setDailySubffix(String dailySubffix) {
        this.dailySubffix = dailySubffix;
    }

    public String getUatSubffix() {
        return uatSubffix;
    }

    public void setUatSubffix(String uatSubffix) {
        this.uatSubffix = uatSubffix;
    }

    public String getProdSubffix() {
        return prodSubffix;
    }

    public void setProdSubffix(String prodSubffix) {
        this.prodSubffix = prodSubffix;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    private MavenProject project;

    public MavenProject getProject() {
        return project;
    }

    public void setProject(MavenProject project) {
        this.project = project;
    }

    public String getEnv() {
        return env;
    }

    public void setEnv(String env) {
        this.env = env;
    }

    public String getDailyBranch() {
        return dailyBranch;
    }

    public void setDailyBranch(String dailyBranch) {
        this.dailyBranch = dailyBranch;
    }

    public String getUatBranch() {
        return uatBranch;
    }

    public void setUatBranch(String uatBranch) {
        this.uatBranch = uatBranch;
    }

    public String getProdBranch() {
        return prodBranch;
    }

    public void setProdBranch(String prodBranch) {
        this.prodBranch = prodBranch;
    }

    public String getNexusUrl() {
        return nexusUrl;
    }

    public void setNexusUrl(String nexusUrl) {
        this.nexusUrl = nexusUrl;
    }

    public VersionLevelEnum getVersionLevel() {
        return versionLevel;
    }

    public void setVersionLevel(VersionLevelEnum versionLevel) {
        this.versionLevel = versionLevel;
    }

    public String getGitUrl() {
        return gitUrl;
    }

    public void setGitUrl(String gitUrl) {
        this.gitUrl = gitUrl;
    }

    public String getUatIsRelease() {
        return uatIsRelease;
    }

    public void setUatIsRelease(String uatIsRelease) {
        this.uatIsRelease = uatIsRelease;
    }

    public String getUpdateDailyVersion() {
        return updateDailyVersion;
    }

    public void setUpdateDailyVersion(String updateDailyVersion) {
        this.updateDailyVersion = updateDailyVersion;
    }

    @Override
    public String toString() {
        return "VersionConfig{" +
                "nexusUrl='" + nexusUrl + '\'' +
                ", versionLevel=" + versionLevel +
                ", gitUrl='" + gitUrl + '\'' +
                ", dailySubffix='" + dailySubffix + '\'' +
                ", uatSubffix='" + uatSubffix + '\'' +
                ", prodSubffix='" + prodSubffix + '\'' +
                ", dailyBranch='" + dailyBranch + '\'' +
                ", uatBranch='" + uatBranch + '\'' +
                ", prodBranch='" + prodBranch + '\'' +
                ", env='" + env + '\'' +
                ", tag='" + tag + '\'' +
                ", userName='" + userName + '\'' +
                ", userEmail='" + userEmail + '\'' +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", fixVersionNumber='" + fixVersionNumber + '\'' +
                ", updateVersion='" + updateVersion + '\'' +
                ", module='" + module + '\'' +
                ", deploy='" + deploy + '\'' +
                ", project=" + project +
                '}';
    }

    public static class VersionConfigBuilder {
        private VersionConfig config;

        public VersionConfigBuilder() {
            config = new VersionConfig();
        }

        public VersionConfigBuilder setNexusUrl(String nexusUrl) {
            config.setNexusUrl(nexusUrl);
            return this;
        }

        public VersionConfigBuilder setVersionLevel(VersionLevelEnum versionLevel) {
            config.setVersionLevel(versionLevel);
            return this;
        }

        public VersionConfigBuilder setGitUrl(String gitUrl) {
            config.setGitUrl(gitUrl);
            return this;
        }

        public VersionConfigBuilder setDailyBranch(String dailyBranch) {
            config.setDailyBranch(dailyBranch);
            return this;
        }

        public VersionConfigBuilder setUatBranch(String uatBranch) {
            config.setUatBranch(uatBranch);
            return this;
        }

        public VersionConfigBuilder setProdBranch(String prodBranch) {
            config.setProdBranch(prodBranch);
            return this;
        }

        public VersionConfigBuilder setEnv(String env) {
            config.setEnv(env);
            return this;
        }

        public VersionConfigBuilder setProject(MavenProject project) {
            config.setProject(project);
            return this;
        }

        public VersionConfigBuilder setTag(String tag) {
            config.setTag(tag);
            return this;
        }

        public VersionConfigBuilder setDailySubffix(String dailySubffix) {
            config.setDailySubffix(dailySubffix);
            return this;
        }

        public VersionConfigBuilder setUatSubffix(String uatSubffix) {
            config.setUatSubffix(uatSubffix);
            return this;
        }

        public VersionConfigBuilder setProdSubffix(String prodSubffix) {
            config.setProdSubffix(prodSubffix);
            return this;
        }

        public VersionConfigBuilder setUserName(String userName) {
            config.setUserName(userName);
            return this;
        }

        public VersionConfigBuilder setUserEmail(String userEmail) {
            config.setUserEmail(userEmail);
            return this;
        }

        public VersionConfigBuilder setName(String name) {
            config.setName(name);
            return this;
        }

        public VersionConfigBuilder setPassword(String password) {
            config.setPassword(password);
            return this;
        }

        public VersionConfigBuilder setFixVersionNumber(String fixVersionNumber) {
            config.setFixVersionNumber(fixVersionNumber);
            return this;
        }

        public VersionConfigBuilder setUpdateVersion(String updateVersion) {
            config.setUpdateVersion(updateVersion);
            return this;
        }

        public VersionConfigBuilder setModule(String module) {
            config.setModule(module);
            return this;
        }

        public VersionConfigBuilder setDeploy(String deploy) {
            config.setDeploy(deploy);
            return this;
        }

        public VersionConfigBuilder hasInstall(String hasInstall) {
            config.setHasInstall(hasInstall);
            return this;
        }

        public VersionConfigBuilder uatIsRelease(String uatIsRelease) {
            config.setUatIsRelease(uatIsRelease);
            return this;
        }

        public VersionConfigBuilder updateDailyVersion(String updateDailyVersion) {
            config.setUpdateDailyVersion(updateDailyVersion);
            return this;
        }

        public VersionConfig build() {
            return config;
        }
    }
}
